/**
 * 
 */
package com.airnewslinkosky.ticket.ui.order;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;

import com.airnewslinkosky.ticket.R;
import com.airnewslinkosky.ticket.ui.BaseActivity;
import com.mobclick.android.MobclickAgent;

/**
 * @author CX
 *
 */
public class OrderChangeDate extends BaseActivity implements OnClickListener {
	
	//行程日期、行程时间、联系电话
	EditText ticketFlyDate, ticketFlyTime, contactNumber;
	
	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.order_change_date);
		
		activityList.add(this);  
		
		ticketFlyDate = (EditText) findViewById(R.id.ticketFlyDate);
		ticketFlyTime = (EditText) findViewById(R.id.ticketFlyTime);
		contactNumber = (EditText) findViewById(R.id.contactNumber);
		
		Bundle data = getIntent().getExtras();
		if (data != null) {
			//初始化电话号码
			String contactNumberValue = data.getString("contactNumberValue");
			contactNumber.setText(contactNumberValue);
		}
		
		//初始化点击事件
		ticketFlyDate.setOnClickListener(this);
		ticketFlyTime.setOnClickListener(this);
		findViewById(R.id.submitButton).setOnClickListener(this);
		findViewById(R.id.cancel).setOnClickListener(this);
	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.ticketFlyDate: {
			showDialog(R.id.ticketFlyDate);
			break;
		}
		case R.id.ticketFlyTime: {
			showDialog(R.id.ticketFlyDate);
			break;
		}
		case R.id.submitButton: {
			
			break;
		}
		case R.id.cancel: {
			finish();
			break;
		}
		default:
			break;
		}
		
	}
	
	public void onResume() {     
		super.onResume();     
		MobclickAgent.onResume(this); 
	}  
	
	public void onPause() {     
		super.onPause();     
		MobclickAgent.onPause(this); 
	}  
	
}
